package cn.luowb.checkchat.dao.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * 点赞
 *
 * @TableName like
 */
@TableName(value = "`like`")
@Accessors(chain = true)
@Data
public class LikeDO {
    /**
     * 点赞ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    @TableField(value = "uid")
    private Long uid;

    /**
     * 被点赞对象ID（帖子ID或评论ID）
     */
    @TableField(value = "obj_id")
    private Long objId;

    /**
     * 类型：0-帖子点赞 1-评论点赞
     */
    @TableField(value = "`type`")
    private Integer type;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

}